@use './variables.scss' as *;

// 全局样式重置
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family:
    'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑',
    Arial, sans-serif;
  font-size: $font-size-base;
  color: $text-primary;
  background-color: $background-base;
}

#app {
  height: 100%;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: $border-lighter;
  border-radius: $border-radius-base;
}

::-webkit-scrollbar-thumb {
  background: $border-light;
  border-radius: $border-radius-base;

  &:hover {
    background: $text-secondary;
  }
}

// 通用工具类
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  flex-direction: column;
}

.full-width {
  width: 100%;
}

.full-height {
  height: 100%;
}

// 边距工具类
.mt-1 {
  margin-top: $spacing-base;
}
.mt-2 {
  margin-top: $spacing-small;
}
.mt-3 {
  margin-top: $spacing-medium;
}
.mt-4 {
  margin-top: $spacing-large;
}

.mb-1 {
  margin-bottom: $spacing-base;
}
.mb-2 {
  margin-bottom: $spacing-small;
}
.mb-3 {
  margin-bottom: $spacing-medium;
}
.mb-4 {
  margin-bottom: $spacing-large;
}

.ml-1 {
  margin-left: $spacing-base;
}
.ml-2 {
  margin-left: $spacing-small;
}
.ml-3 {
  margin-left: $spacing-medium;
}
.ml-4 {
  margin-left: $spacing-large;
}

.mr-1 {
  margin-right: $spacing-base;
}
.mr-2 {
  margin-right: $spacing-small;
}
.mr-3 {
  margin-right: $spacing-medium;
}
.mr-4 {
  margin-right: $spacing-large;
}

.pt-1 {
  padding-top: $spacing-base;
}
.pt-2 {
  padding-top: $spacing-small;
}
.pt-3 {
  padding-top: $spacing-medium;
}
.pt-4 {
  padding-top: $spacing-large;
}

.pb-1 {
  padding-bottom: $spacing-base;
}
.pb-2 {
  padding-bottom: $spacing-small;
}
.pb-3 {
  padding-bottom: $spacing-medium;
}
.pb-4 {
  padding-bottom: $spacing-large;
}

.pl-1 {
  padding-left: $spacing-base;
}
.pl-2 {
  padding-left: $spacing-small;
}
.pl-3 {
  padding-left: $spacing-medium;
}
.pl-4 {
  padding-left: $spacing-large;
}

.pr-1 {
  padding-right: $spacing-base;
}
.pr-2 {
  padding-right: $spacing-small;
}
.pr-3 {
  padding-right: $spacing-medium;
}
.pr-4 {
  padding-right: $spacing-large;
}
